/*
 * @Author: HeAo
 * @Date: 2021-09-28 11:23:06
 * @LastEditTime: 2021-09-28 11:30:51
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \web2103-2105\web2103code\3-1-ES6\day04\6-symbol-for.js
 * 别乱动！
 */
let sy1 = Symbol('one')
let sy2 = Symbol('one')

console.log(sy1, sy2);
console.log(sy1 === sy2);

let sy3 = Symbol.for('two')
let sy4 = Symbol.for('two')
console.log(sy3, sy4);
console.log(sy3 === sy4);

console.log(Symbol.keyFor(sy1));
console.log(Symbol.keyFor(sy2));
console.log(Symbol.keyFor(sy3));
console.log(Symbol.keyFor(sy4));

let key = Symbol.keyFor(sy3)
let value = Symbol.for(key)
console.log(value === sy3);
